﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="AddService.aspx.cs" Inherits="AddService" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <div>
  <table width="100%">
  <tr>
    <td class="header">New Service</td>
  </tr>
  </table>
  <br />
    <table class="table01">
        <tr>
            <td width="20%">
                <b>Service Name</b>
            </td>
            <td width="40%">
                <asp:TextBox ID="txtServiceName" runat="server" Width="200" ValidationGroup="AddService"></asp:TextBox>
                <asp:RequiredFieldValidator ID="valServiceName" runat="server" ErrorMessage="Please enter name of service"
                    ControlToValidate="txtServiceName" ValidationGroup="AddService">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td width="20%">
                <b>Service Image</b>
            </td>
            <td width="40%">
                <asp:FileUpload ID="ImageServiceUpload" runat="server" Width="200" ValidationGroup="AddService" />
                <asp:RequiredFieldValidator ID="valUploadServiceImage" runat="server" ErrorMessage="Please choose Image of service"
                    ControlToValidate="ImageServiceUpload" ValidationGroup="AddService">*</asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ValidationGroup="AddService" ID="RegularExpressionImage"
                    runat="server" ControlToValidate="ImageServiceUpload" ValidationExpression="(.*?)\.(jpg|jpeg|png|gif)$"
                    ErrorMessage="Image is not valid" Text="*"></asp:RegularExpressionValidator>
                <asp:Label ID="lblImageFile" runat="server" Font-Bold="True"></asp:Label>
            </td>
        </tr>
        <tr>
            <td width="20%">
                <b>Service Description</b>
            </td>
            <td width="40%">
                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Height="50" ValidationGroup="AddService"
                    Width="200"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btnReset" runat="server" Text="Reset" CausesValidation="false"  
                    ValidationGroup="AddService" onclick="btnReset_Click"/>
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
                    ValidationGroup="AddService" onclick="btnSubmit_Click" />
            </td>
        </tr>
        
        <tr>
            <td colspan="2">
               <asp:ValidationSummary ID="ValidationSummary1" runat="server"  ValidationGroup="AddService"/>
        </tr>
        
        <tr>
            <td colspan="2">
                <asp:Label ID="lblMessage" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
        </tr>
        
    </table>
    </div>
</asp:Content>

